/*
 * @Author: wangtao
 * @Date: 2020-12-18 09:14:01
 * @LastEditors: 汪滔
 * @LastEditTime: 2021-06-03 18:47:16
 * @Description: 配置合同
 */
import React, { Component } from 'react';
import {
  StyleSheet,
  View,
  Text,
  Image,
  TouchableOpacity,
} from 'react-native';
import { XMHeader, BackImageOn, msg, _ } from '@/common';
import { logoLoading } from '@/images';
import { isAndroid, mainBgColorWhite, px2dp } from '@/styles';

export default class GenerateContract extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  componentDidMount() { }

  render() {
    const { contractStatus } = this.props;
    return (
      <View style={styles.container}>
        <XMHeader
          renderLeft={() => {
            return <BackImageOn />;
          }}
        />
        <Image source={logoLoading} style={styles.loadingImg} resizeMode='stretch' />

        <Text style={[styles.tips, { marginTop: px2dp(56) }]}>正在配置合同条款…</Text>
        <View style={styles.bottomTips}>
          {
            contractStatus == 1 ?
              <Text style={styles.tips}>正在生成合同文件…</Text> :
              <Text style={[styles.tips, { marginTop: px2dp(32) }]}>正在读取合同文件…</Text>
          }

        </View>

      </View>
    );
  }
}
const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    backgroundColor: mainBgColorWhite,
  },
  dot: {
    position: 'absolute',
    left: px2dp(32),
    ..._.ifIphoneX({ top: px2dp(112) }, isAndroid ? { top: px2dp(32) } : { top: px2dp(82) }),
  },
  loadingImg: {
    width: px2dp(148),
    height: px2dp(148),
    marginTop: px2dp(260)
  },
  tips: {
    fontSize: px2dp(32),
    fontWeight: 'bold',
  },
  bottomTips: {
    position: 'absolute',
    bottom: px2dp(166),
  }
});
